package com.tz.controller;

import com.tz.service.ProducerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/message")
public class ProducerController {

    @Autowired
    private ProducerService messageService;
    @PostMapping("/send")
    public String sendMessage(@RequestParam("userId") String userId,@RequestParam("content") String content) {
        messageService.sendMessage(userId,content);
        return "发送成功";
    }
}
